Optimal. Leaf size=76 \[ -\frac {1}{4} b^2 x^2-\frac {b x \sqrt {1-c^2 x^2} (a+b \text {ArcCos}(c x))}{2 c}-\frac {(a+b \text {ArcCos}(c x))^2}{4 c^2}+\frac {1}{2} x^2 (a+b \text {ArcCos}(c x))^2 \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.08, antiderivative size = 76, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {4724, 4796,
4738, 30} \begin {gather*} -\frac {b x \sqrt {1-c^2 x^2} (a+b \text {ArcCos}(c x))}{2 c}-\frac {(a+b \text {ArcCos}(c x))^2}{4 c^2}+\frac {1}{2} x^2 (a+b \text {ArcCos}(c x))^2-\frac {1}{4} b^2 x^2 \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 30
Rule 4724
Rule 4738
Rule 4796
Rubi steps
\begin {align*} \int x \left (a+b \cos ^{-1}(c x)\right )^2 \, dx &=\frac {1}{2} x^2 \left (a+b \cos ^{-1}(c x)\right )^2+(b c) \int \frac {x^2 \left (a+b \cos ^{-1}(c x)\right )}{\sqrt {1-c^2 x^2}} \, dx\\ &=-\frac {b x \sqrt {1-c^2 x^2} \left (a+b \cos ^{-1}(c x)\right )}{2 c}+\frac {1}{2} x^2 \left (a+b \cos ^{-1}(c x)\right )^2-\frac {1}{2} b^2 \int x \, dx+\frac {b \int \frac {a+b \cos ^{-1}(c x)}{\sqrt {1-c^2 x^2}} \, dx}{2 c}\\ &=-\frac {1}{4} b^2 x^2-\frac {b x \sqrt {1-c^2 x^2} \left (a+b \cos ^{-1}(c x)\right )}{2 c}-\frac {\left (a+b \cos ^{-1}(c x)\right )^2}{4 c^2}+\frac {1}{2} x^2 \left (a+b \cos ^{-1}(c x)\right )^2\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.07, size = 104, normalized size = 1.37 \begin {gather*} \frac {c x \left (2 a^2 c x-b^2 c x-2 a b \sqrt {1-c^2 x^2}\right )+2 b c x \left (2 a c x-b \sqrt {1-c^2 x^2}\right ) \text {ArcCos}(c x)+b^2 \left (-1+2 c^2 x^2\right ) \text {ArcCos}(c x)^2+2 a b \text {ArcSin}(c x)}{4 c^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.06, size = 118, normalized size = 1.55
method | result | size |
derivativedivides | \(\frac {\frac {c^{2} x^{2} a^{2}}{2}+b^{2} \left (\frac {c^{2} x^{2} \arccos \left (c x \right )^{2}}{2}-\frac {\arccos \left (c x \right ) \left (c x \sqrt {-c^{2} x^{2}+1}+\arccos \left (c x \right )\right )}{2}+\frac {\arccos \left (c x \right )^{2}}{4}-\frac {c^{2} x^{2}}{4}+\frac {1}{4}\right )+2 a b \left (\frac {c^{2} x^{2} \arccos \left (c x \right )}{2}-\frac {c x \sqrt {-c^{2} x^{2}+1}}{4}+\frac {\arcsin \left (c x \right )}{4}\right )}{c^{2}}\) | \(118\) |
default | \(\frac {\frac {c^{2} x^{2} a^{2}}{2}+b^{2} \left (\frac {c^{2} x^{2} \arccos \left (c x \right )^{2}}{2}-\frac {\arccos \left (c x \right ) \left (c x \sqrt {-c^{2} x^{2}+1}+\arccos \left (c x \right )\right )}{2}+\frac {\arccos \left (c x \right )^{2}}{4}-\frac {c^{2} x^{2}}{4}+\frac {1}{4}\right )+2 a b \left (\frac {c^{2} x^{2} \arccos \left (c x \right )}{2}-\frac {c x \sqrt {-c^{2} x^{2}+1}}{4}+\frac {\arcsin \left (c x \right )}{4}\right )}{c^{2}}\) | \(118\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 1.42, size = 99, normalized size = 1.30 \begin {gather*} \frac {{\left (2 \, a^{2} - b^{2}\right )} c^{2} x^{2} + {\left (2 \, b^{2} c^{2} x^{2} - b^{2}\right )} \arccos \left (c x\right )^{2} + 2 \, {\left (2 \, a b c^{2} x^{2} - a b\right )} \arccos \left (c x\right ) - 2 \, {\left (b^{2} c x \arccos \left (c x\right ) + a b c x\right )} \sqrt {-c^{2} x^{2} + 1}}{4 \, c^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 131 vs.
\(2 (65) = 130\).
time = 0.15, size = 131, normalized size = 1.72 \begin {gather*} \begin {cases} \frac {a^{2} x^{2}}{2} + a b x^{2} \operatorname {acos}{\left (c x \right )} - \frac {a b x \sqrt {- c^{2} x^{2} + 1}}{2 c} - \frac {a b \operatorname {acos}{\left (c x \right )}}{2 c^{2}} + \frac {b^{2} x^{2} \operatorname {acos}^{2}{\left (c x \right )}}{2} - \frac {b^{2} x^{2}}{4} - \frac {b^{2} x \sqrt {- c^{2} x^{2} + 1} \operatorname {acos}{\left (c x \right )}}{2 c} - \frac {b^{2} \operatorname {acos}^{2}{\left (c x \right )}}{4 c^{2}} & \text {for}\: c \neq 0 \\\frac {x^{2} \left (a + \frac {\pi b}{2}\right )^{2}}{2} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.43, size = 119, normalized size = 1.57 \begin {gather*} \frac {1}{2} \, b^{2} x^{2} \arccos \left (c x\right )^{2} + a b x^{2} \arccos \left (c x\right ) + \frac {1}{2} \, a^{2} x^{2} - \frac {1}{4} \, b^{2} x^{2} - \frac {\sqrt {-c^{2} x^{2} + 1} b^{2} x \arccos \left (c x\right )}{2 \, c} - \frac {\sqrt {-c^{2} x^{2} + 1} a b x}{2 \, c} - \frac {b^{2} \arccos \left (c x\right )^{2}}{4 \, c^{2}} - \frac {a b \arccos \left (c x\right )}{2 \, c^{2}} + \frac {b^{2}}{8 \, c^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int x\,{\left (a+b\,\mathrm {acos}\left (c\,x\right )\right )}^2 \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________